/** */
package buffer.model;

import com.thoughtworks.xstream.annotations.XStreamAsAttribute;

import java.io.Serializable;

/**
 * @功能:
 * @项目名:depostitoryCommon
 * @作者:20314@etransfar.com(zhangbin)
 * @日期:2018年7月27日上午9:21:46
 */
public class BaseResponseModel implements Serializable {

    /**
     * 序列化UID
     */
    private static final long serialVersionUID = -2702749227390077006L;
    @XStreamAsAttribute
    /** 请求唯一编号 */
    private String id;
    /**
     * 版本号
     */
    private String version;
    /**
     * P2P平台在银行的唯一标识
     */
    private String instId;
    /**
     * 数字证书标识
     */
    private String certId;
    /**
     * extension
     */
    private String extension;
    /**
     * 错误代码
     */
    private String errorCode;
    /**
     * 错误描述
     */
    private String errorMessage;
    /**
     * 详细错误信息
     */
    private String errorDetail;
    /**
     * 服务方代码,消息创建者特有的代码
     */
    private String vendorCode;
    /**
     * 金融系统ID,接入时必填，暂定为“CZBANK”
     */
    private String channelSystemId;
    /**
     * 交易状态，1．失败，2.未知（处理中）
     */
    private String status;
    /**
     * 银行原始错误码，接入时必填
     */
    private String bankErrorCode;
    /**
     * 银行原始错误码描述，接入时必填
     */
    private String bankErrorMessage;


//    public TRXStatusEnum resultType() {
//        if (bankErrorCode == null) {
//            if ("1".equals(status)) {
//                return TRXStatusEnum.SUCCESS;
//            } else if ("2".equals(status)) {
//				return TRXStatusEnum.FAIL;
//            }
//        } else {
//            return TRXStatusEnum.EXCEPTION_FAIL;
//        }
//        return TRXStatusEnum.SUCCESS;
//    }


    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getInstId() {
        return instId;
    }

    public void setInstId(String instId) {
        this.instId = instId;
    }

    public String getCertId() {
        return certId;
    }

    public void setCertId(String certId) {
        this.certId = certId;
    }

    public String getExtension() {
        return extension;
    }

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public String getErrorDetail() {
        return errorDetail;
    }

    public void setErrorDetail(String errorDetail) {
        this.errorDetail = errorDetail;
    }

    public String getVendorCode() {
        return vendorCode;
    }

    public void setVendorCode(String vendorCode) {
        this.vendorCode = vendorCode;
    }

    public String getChannelSystemId() {
        return channelSystemId;
    }

    public void setChannelSystemId(String channelSystemId) {
        this.channelSystemId = channelSystemId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getBankErrorCode() {
        return bankErrorCode;
    }

    public void setBankErrorCode(String bankErrorCode) {
        this.bankErrorCode = bankErrorCode;
    }

    public String getBankErrorMessage() {
        return bankErrorMessage;
    }

    public void setBankErrorMessage(String bankErrorMessage) {
        this.bankErrorMessage = bankErrorMessage;
    }
}
